<?php
return array(
    'controllers' => array(
        'factories' => array(
            'Restaurant\Controller\Index' =>
            'Restaurant\Factory\Controller\IndexControllerFactory',
            'Restaurant\Controller\Catalog' =>
            'Restaurant\Factory\Controller\CatalogControllerFactory',
            'Restaurant\Controller\Article' =>
            'Restaurant\Factory\Controller\ArticleControllerFactory',
            'Restaurant\Controller\GeneralDish' =>
            'Restaurant\Factory\Controller\GeneralDishControllerFactory',
            'Restaurant\Controller\DayDish' =>
            'Restaurant\Factory\Controller\DayDishControllerFactory',

        ),
        'invokables' => array(
        ),
    ),
    'router' => array(
        'routes' => array(
            'restaurant' => array(
                'type' => 'segment',
                'options' => array(
                    'route' => '/:domain/admin',
                    'defaults' => array(
                        'controller' => 'Restaurant\Controller\Index',
                        'action' => 'index',
                    )
                ),
                'may_terminate' => true,
                'child_routes' => array(
                    'catalog' => array(
                        'type' => 'segment',
                        'options' => array(
                            'route' => '/catalog[/:action]',
                            'defaults' => array(
                                'controller' => 'Restaurant\Controller\Catalog',
                                'action' => 'index'
                            )

                        )
                    ),
                    'article' => array(
                        'type' => 'segment',
                        'options' => array(
                            'route' => '/article[/:action]',
                            'defaults' => array(
                                'controller' => 'Restaurant\Controller\Article',
                                'action' => 'index'
                            )

                        )
                    ),
                    'general_dish' => array(
                        'type' => 'segment',
                        'options' => array(
                            'route' => '/general-dish[/:action]',
                            'defaults' => array(
                                'controller' => 'Restaurant\Controller\GeneralDish',
                                'action' => 'index'
                            )

                        )
                    ),
                    'day_dish' => array(
                        'type' => 'segment',
                        'options' => array(
                            'route' => '/day-dish[/:action]',
                            'defaults' => array(
                                'controller' => 'Restaurant\Controller\DayDish',
                                'action' => 'index'
                            )

                        )
                    ),
                    'index' => array(
                        'type' => 'segment',
                        'options' => array(
                            'route' => '/index[/:action]',
                            'defaults' => array(
                                'controller' => 'Restaurant\Controller\Index',
                                'action' => 'index'
                            )

                        )
                    ),
                )
            ),
        ),
    ),

    'view_manager' => array(
        'template_map' => array(
            'restaurant/index/index' => __DIR__ .  '/../view/restaurant/index/index.php',
            'error/index'             => __DIR__ . '/../view/error/index.php',
            'error/404'               => __DIR__ . '/../view/error/404.php',
        ),
        'template_path_stack' => array(
            __DIR__ . '/../view',
            __DIR__ . '/../view/layout',
            CORE_COMMON_TEMPLATE.'/includes',
            CORE_COMMON_TEMPLATE.'/blocks',
            CORE_COMMON_TEMPLATE.'/tmp',
        ),
        'strategies' => array(
            'ViewJsonStrategy',
        ),
        'display_exceptions' => true,
//        'exception_template' => 'error/index',
        'display_not_found_reason' => true,
        'not_found_template'       => 'error/404',
        'default_template_suffix'=>'php',
    )


);
?>